import React from 'react';
import loadjs from 'loadjs';
import { workflowPublicFiles } from '../constants/fileConfig';
import Loading from './Loading';
import * as asyncLoad from "../util/asyncLoad";

export default class RemindTypelist extends React.Component {

    constructor() {
        super();
        this.state = { hasLoad: false };
    }

    componentDidMount() {
        const init = () => {
            this.setState({ hasLoad: true });
        }
        asyncLoad.asyncLoadModule('workflowPublic', workflowPublicFiles, init);
    }
    render() {
        const { hasLoad } = this.state;
        if (hasLoad) {
            const { RemindTypelist } = window.weaWorkflowPublic;

            return (<RemindTypelist ecId={`${this && this.props && this.props.ecId || ''}_RemindTypelist@lmh4ky`} {...this.props} />);
        } else {
            return (<Loading ecId={`${this && this.props && this.props.ecId || ''}_Loading@lae9c7`} />);
        }
    }
}